home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update16.zoo / gcc-2.0 / gcc-20.diff < prev    next >
Encoding:
Text File  |  1992-03-06  |  58.8 KB  |  2,131 lines

  1. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/c-aux-info.c    Sat Feb 15 16:24:40 1992
  2. --- c-aux-info.c    Fri Mar  6 15:18:03 1992
  3. ***************
  4. *** 59,65 ****
  5.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  6.      the few exceptions to the general rule here.  */
  7.   
  8. ! #if !(defined (USG) || defined (VMS))
  9.   extern char *getwd ();
  10.   #define getcwd(buf,len) getwd(buf)
  11.   #define GUESSPATHLEN (MAXPATHLEN + 1)
  12. --- 59,65 ----
  13.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  14.      the few exceptions to the general rule here.  */
  15.   
  16. ! #if !(defined (USG) || defined (VMS) || defined(CROSSHPUX))
  17.   extern char *getwd ();
  18.   #define getcwd(buf,len) getwd(buf)
  19.   #define GUESSPATHLEN (MAXPATHLEN + 1)
  20. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/c-decl.c    Thu Feb 13 17:21:26 1992
  21. --- c-decl.c    Fri Mar  6 15:18:01 1992
  22. ***************
  23. *** 5351,5356 ****
  24. --- 5351,5358 ----
  25.   
  26.     expand_function_start (fndecl, 0);
  27.   
  28. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  29. +   /* we will only need this in cp-decl.c, not here */
  30.     /* If this function is `main', emit a call to `__main'
  31.        to run global initializers, etc.  */
  32.     if (DECL_NAME (fndecl)
  33. ***************
  34. *** 5357,5362 ****
  35. --- 5359,5365 ----
  36.         && strcmp (IDENTIFIER_POINTER (DECL_NAME (fndecl)), "main") == 0
  37.         && DECL_CONTEXT (fndecl) == NULL_TREE)
  38.       expand_main_function ();
  39. + #endif
  40.   }
  41.   
  42.   /* SPECPARMS is an identifier list--a chain of TREE_LIST nodes
  43. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cccp.c    Tue Feb 18 19:52:51 1992
  44. --- cccp.c    Fri Mar  6 15:18:06 1992
  45. ***************
  46. *** 58,63 ****
  47. --- 58,65 ----
  48.   #undef bzero
  49.   #undef bcmp
  50.   
  51. + #ifndef atarist
  52.   #include <sys/types.h>
  53.   #include <sys/stat.h>
  54.   #include <ctype.h>
  55. ***************
  56. *** 66,85 ****
  57.   
  58.   #ifndef VMS
  59.   #include <sys/file.h>
  60. ! #ifndef USG
  61.   #include <sys/time.h>        /* for __DATE__ and __TIME__ */
  62.   #include <sys/resource.h>
  63.   #else
  64.   #define index strchr
  65.   #define rindex strrchr
  66.   #include <time.h>
  67.   #include <fcntl.h>
  68. ! #endif /* USG */
  69.   #endif /* not VMS */
  70. -   
  71.   extern char *index ();
  72.   extern char *rindex ();
  73.   
  74.   /* VMS-specific definitions */
  75.   #ifdef VMS
  76.   #include <time.h>
  77. --- 68,105 ----
  78.   
  79.   #ifndef VMS
  80.   #include <sys/file.h>
  81. ! #if (!(defined(USG) || defined(atariminix)))
  82.   #include <sys/time.h>        /* for __DATE__ and __TIME__ */
  83.   #include <sys/resource.h>
  84.   #else
  85. + #ifndef atariminix
  86.   #define index strchr
  87.   #define rindex strrchr
  88. + #endif
  89.   #include <time.h>
  90.   #include <fcntl.h>
  91. ! #endif /* USG or atariminix */
  92.   #endif /* not VMS */
  93.   extern char *index ();
  94.   extern char *rindex ();
  95.   
  96. + #else    /* atarist */
  97. + #include <ctype.h>
  98. + #include <stdio.h>
  99. + #include <types.h>
  100. + #include <stat.h>
  101. + #include <file.h>
  102. + #include <time.h>
  103. + #include <string.h>
  104. + #include "stddef.h"
  105. + long _stksize = -1L;    /* want big stack cause include files
  106. +                    get alloca'ed there */
  107. + #endif        /* atarist */
  108. +   
  109.   /* VMS-specific definitions */
  110.   #ifdef VMS
  111.   #include <time.h>
  112. ***************
  113. *** 847,853 ****
  114. --- 867,927 ----
  115.   /* Nonzero means -I- has been seen,
  116.      so don't look for #include "foo" the source-file directory.  */
  117.   static int ignore_srcdir;
  118. +  
  119. + #ifdef atarist
  120. + /* a little frobule to filter incoming file data */
  121. + int eunuchs_read(f, buf, size)
  122. + int f;
  123. + char * buf;
  124. + int size;
  125. + {
  126. +     char local_buf[1024];
  127. +     register int result_size;
  128. +     register char * local_bufp, * target_bufp;
  129. +     register int buf_size, size_read;
  130. +     
  131. +     for (result_size = 0, target_bufp = buf ; size > 0 ; size -= 1024)
  132. +     { /* do a buffer */
  133. +     if (size > 1024)
  134. +         buf_size = 1024;
  135. +     else
  136. +         buf_size = size;
  137. +     size_read = read(f, &local_buf, buf_size);
  138. +     for (local_bufp = (char * ) &local_buf; size_read > 0 ; size_read--)
  139. +         if (*local_bufp == '\r')
  140. +         local_bufp++;
  141. +         else
  142. +         {
  143. +         *target_bufp++ = *local_bufp++;
  144. +         result_size++;
  145. +         }
  146. +     }
  147. +     return(result_size);
  148. + }
  149. + /* the following dingus is used in place of some calls to bcopy,
  150. +    to ensure that backslashes get properly slashified when getting
  151. +    shoved into strings.  Note that it returns the new pointer!!
  152. +    There ought to be a better way... */
  153. + U_CHAR * slashifying_bcopy(from_buf, to_buf, nbytes)
  154. + U_CHAR * from_buf, * to_buf;
  155. + int nbytes;
  156. + {
  157. +   for ( ; nbytes > 0 ; )
  158. +     {
  159. +     if(*from_buf == '\\')
  160. +         *to_buf++ = '\\';
  161. +     *to_buf++ = *from_buf++;
  162. +     nbytes--;
  163. +     }
  164. +   return(to_buf);
  165. + }
  166. + #define read(a, b, c) eunuchs_read(a, b, c)
  167. + #endif        /* atarist */
  168.   
  169. + #ifndef atarist
  170.   /* Handler for SIGPIPE.  */
  171.   
  172.   static void
  173. ***************
  174. *** 857,862 ****
  175. --- 931,937 ----
  176.   {
  177.     fatal ("output pipe has been closed");
  178.   }
  179. + #endif /* atarist */
  180.   
  181.   int
  182.   main (argc, argv)
  183. ***************
  184. *** 891,896 ****
  185. --- 966,976 ----
  186.     /* Target-name to write with the dependency information.  */
  187.     char *deps_target = 0;
  188.   
  189. + #ifdef atarist
  190. + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
  191. + /*  _malloczero(1); */     /* zero mallocs by default */
  192. + #endif  
  193.   #ifdef RLIMIT_STACK
  194.     /* Get rid of any avoidable limit on stack size.  */
  195.     {
  196. ***************
  197. *** 939,944 ****
  198. --- 1019,1025 ----
  199.     signal (SIGPIPE, pipe_closed);
  200.   #endif
  201.   
  202. + #ifndef atarist
  203.     for (i = 0; include_defaults[i].fname; i++)
  204.       max_include_len = MAX (max_include_len,
  205.                  strlen (include_defaults[i].fname));
  206. ***************
  207. *** 946,952 ****
  208.   #ifdef VMS
  209.     max_include_len += 10;
  210.   #endif
  211.     bzero (pend_files, argc * sizeof (char *));
  212.     bzero (pend_defs, argc * sizeof (char *));
  213.     bzero (pend_undefs, argc * sizeof (char *));
  214. --- 1027,1036 ----
  215.   #ifdef VMS
  216.     max_include_len += 10;
  217.   #endif
  218. ! #else
  219. !   max_include_len = 80;    /* arbitrary value */
  220. ! #endif
  221. !   
  222.     bzero (pend_files, argc * sizeof (char *));
  223.     bzero (pend_defs, argc * sizeof (char *));
  224.     bzero (pend_undefs, argc * sizeof (char *));
  225. ***************
  226. *** 1145,1154 ****
  227. --- 1229,1244 ----
  228.       break;
  229.   
  230.         case 'v':
  231. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  232. + #include "PatchLev.h"
  233. +     fprintf (stderr, "GNU CPP-atariST version %s Patchlevel %s",
  234. +          version_string, PatchLevel);
  235. + #else
  236.       fprintf (stderr, "GNU CPP version %s", version_string);
  237.   #ifdef TARGET_VERSION
  238.       TARGET_VERSION;
  239.   #endif
  240. + #endif
  241.       fprintf (stderr, "\n");
  242.       break;
  243.   
  244. ***************
  245. *** 1282,1287 ****
  246. --- 1372,1378 ----
  247.       }
  248.     }
  249.   
  250. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  251.     /* Add dirs from CPATH after dirs from -I.  */
  252.     /* There seems to be confusion about what CPATH should do,
  253.        so for the moment it is not documented.  */
  254. ***************
  255. *** 1291,1296 ****
  256. --- 1382,1388 ----
  257.     p = (char *) getenv ("CPATH");
  258.     if (p != 0 && ! no_standard_includes)
  259.       path_include (p);
  260. + #endif
  261.   
  262.     /* Now that dollars_in_ident is known, initialize is_idchar.  */
  263.     initialize_char_syntax ();
  264. ***************
  265. *** 1411,1434 ****
  266.   
  267.     done_initializing = 1;
  268.   
  269.     { /* read the appropriate environment variable and if it exists
  270.          replace include_defaults with the listed path. */
  271.       char *epath = 0;
  272. !     switch ((objc << 1) + cplusplus)
  273. !       {
  274.         case 0:
  275. !     epath = getenv ("C_INCLUDE_PATH");
  276.       break;
  277.         case 1:
  278. !     epath = getenv ("C++_INCLUDE_PATH");
  279.       break;
  280.         case 2:
  281. !     epath = getenv ("OBJC_INCLUDE_PATH");
  282.       break;
  283.         case 3:
  284. !     epath = getenv ("OBJC++_INCLUDE_PATH");
  285. !     break;
  286. !       }
  287.       /* If the environment var for this language is set,
  288.          add to the default list of include directories.  */
  289.       if (epath) {
  290. --- 1503,1550 ----
  291.   
  292.     done_initializing = 1;
  293.   
  294. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  295. +   for(i = 0; i < 4; i++)
  296. + #endif
  297.     { /* read the appropriate environment variable and if it exists
  298.          replace include_defaults with the listed path. */
  299.       char *epath = 0;
  300. ! #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  301. !     switch(i)
  302. !     {
  303.         case 0:
  304. !     epath = getenv("GNUINC");
  305.       break;
  306.         case 1:
  307. !     epath = getenv("GNULIB");
  308.       break;
  309.         case 2:
  310. !     if(cplusplus) epath = getenv("GXXINC"); else epath = 0;
  311.       break;
  312. +     
  313.         case 3:
  314. ! #endif
  315. !     switch ((objc << 1) + cplusplus)
  316. !     {
  317. !       case 0:
  318. !         epath = getenv ("C_INCLUDE_PATH");
  319. !         break;
  320. !       case 1:
  321. !         epath = getenv ("C++_INCLUDE_PATH");
  322. !         break;
  323. !       case 2:
  324. !         epath = getenv ("OBJC_INCLUDE_PATH");
  325. !         break;
  326. !       case 3:
  327. !         epath = getenv ("OBJC++_INCLUDE_PATH");
  328. !         break;
  329. !     }
  330. ! #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  331. !     }
  332. ! #endif
  333. !     
  334.       /* If the environment var for this language is set,
  335.          add to the default list of include directories.  */
  336.       if (epath) {
  337. ***************
  338. *** 1437,1443 ****
  339. --- 1553,1563 ----
  340.         char *startp, *endp;
  341.   
  342.         for (num_dirs = 1, startp = epath; *startp; startp++)
  343. + #ifdef atarist
  344. +     if ((*startp == ';') || (*startp == ','))
  345. + #else
  346.       if (*startp == ':')
  347. + #endif
  348.         num_dirs++;
  349.         include_defaults
  350.       = (struct default_include *) xmalloc ((num_dirs
  351. ***************
  352. *** 1446,1452 ****
  353. --- 1566,1576 ----
  354.         startp = endp = epath;
  355.         num_dirs = 0;
  356.         while (1) {
  357. + #ifdef atarist
  358. +     if ((*endp == ';') || (*endp == ',') || (*endp == '\0')) {
  359. + #else
  360.       if ((*endp == ':') || (*endp == '\0')) {
  361. + #endif
  362.         strncpy (nstore, startp, endp-startp);
  363.         if (endp == startp)
  364.           strcpy (nstore, ".");
  365. ***************
  366. *** 1455,1461 ****
  367. --- 1579,1589 ----
  368.   
  369.         max_include_len = MAX (max_include_len, endp-startp+2);
  370.         include_defaults[num_dirs].fname = savestring (nstore);
  371. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  372. +       include_defaults[num_dirs].cplusplus = (i > 1) ? cplusplus : 0;
  373. + #else
  374.         include_defaults[num_dirs].cplusplus = cplusplus;
  375. + #endif
  376.         num_dirs++;
  377.         if (*endp == '\0')
  378.           break;
  379. ***************
  380. *** 1473,1480 ****
  381. --- 1601,1616 ----
  382.        tack on the standard include file dirs to the specified list */
  383.     if (!no_standard_includes) {
  384.       struct default_include *p = include_defaults;
  385. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  386. +     char *specd_prefix = NULL;
  387. + #else
  388.       char *specd_prefix = getenv ("GCC_EXEC_PREFIX");
  389. + #endif
  390. + #ifdef GCC_INCLUDE_DIR
  391.       char *default_prefix = savestring (GCC_INCLUDE_DIR);
  392. + #else
  393. +     char *default_prefix = savestring ("./");
  394. + #endif
  395.       int default_len = 0;
  396.       /* Remove the `include' from /usr/local/lib/gcc.../include.  */
  397.       if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) {
  398. ***************
  399. *** 1481,1486 ****
  400. --- 1617,1628 ----
  401.         default_len = strlen (default_prefix) - 7;
  402.         default_prefix[default_len] = 0;
  403.       }
  404. + #ifdef atarist
  405. +     else if (!strcmp (default_prefix + strlen (default_prefix) - 8, "\\include")) {
  406. +       default_len = strlen (default_prefix) - 7;
  407. +       default_prefix[default_len] = 0;
  408. +     }
  409. + #endif
  410.       /* Search "translated" versions of GNU directories.
  411.          These have /usr/local/lib/gcc... replaced by specd_prefix.  */
  412.       if (specd_prefix != 0 && default_len != 0)
  413. ***************
  414. *** 1635,1641 ****
  415. --- 1777,1787 ----
  416.         char *p1 = p;
  417.         /* Discard all directory prefixes from P.  */
  418.         while (*p1) {
  419. + #ifdef atarist
  420. +     if ((*p1 == '/') || (*p1 == '\\'))
  421. + #else
  422.       if (*p1 == '/')
  423. + #endif
  424.         p = p1 + 1;
  425.       p1++;
  426.         }
  427. ***************
  428. *** 1795,1800 ****
  429. --- 1941,1947 ----
  430.     return 0;
  431.   }
  432.   
  433. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  434.   /* Given a colon-separated list of file names PATH,
  435.      add all the names to the search path for include files.  */
  436.   
  437. ***************
  438. *** 1849,1854 ****
  439. --- 1996,2002 ----
  440.         p++;
  441.       }
  442.   }
  443. + #endif
  444.   
  445.   /* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
  446.      before main CCCP processing.  Name `pcp' is also in honor of the
  447. ***************
  448. *** 3433,3440 ****
  449. --- 3581,3597 ----
  450.   
  451.         if (string)
  452.       {
  453. + #ifndef atarist
  454.         buf = (char *) alloca (3 + strlen (string));
  455.         sprintf (buf, "\"%s\"", string);
  456. + #else
  457. +           buf = (char *) alloca (16 + strlen (string));
  458. +           {
  459. +           char *tbuf = (char *) alloca (16 + strlen (string));
  460. +           (void) slashifying_bcopy(string, tbuf, strlen(string)+1);
  461. +           sprintf (buf, "\"%s\"", tbuf);
  462. +           }
  463. + #endif /* atarist */
  464.       }
  465.         else
  466.       buf = "\"\"";
  467. ***************
  468. *** 3636,3642 ****
  469. --- 3793,3804 ----
  470.           dsp[0].next = search_start;
  471.           search_start = dsp;
  472.   #ifndef VMS
  473. + #ifdef atarist
  474. +         if((ep = rindex(nam, '\\')) == NULL)
  475. +         ep = rindex(nam, '/');
  476. + #else
  477.           ep = rindex (nam, '/');
  478. + #endif
  479.   #else                /* VMS */
  480.           ep = rindex (nam, ']');
  481.           if (ep == NULL) ep = rindex (nam, '>');
  482. ***************
  483. *** 3726,3734 ****
  484. --- 3888,3910 ----
  485.   
  486.     /* If specified file name is absolute, just open it.  */
  487.   
  488. + #ifdef atarist
  489. +   if ((*fbeg == '\\') || (*fbeg == '/')) {
  490. +     if(fbeg[2] == ':')
  491. +     { /* allow "\D:\xxx" */
  492. +         strncpy (fname, fbeg+1, flen-1);
  493. +         fname[flen-1] = 0;
  494. +     }
  495. +     else
  496. +     {  /* allow "\lib\xxx" == "\currentdrive:\lib\xxx" */
  497. +         strncpy (fname, fbeg, flen);
  498. +         fname[flen] = 0;
  499. +     }
  500. + #else
  501.     if (*fbeg == '/') {
  502.       strncpy (fname, fbeg, flen);
  503.       fname[flen] = 0;
  504. + #endif
  505.       if (importing)
  506.         f = lookup_import (fname);
  507.       else
  508. ***************
  509. *** 3747,3753 ****
  510. --- 3923,3933 ----
  511.       if (searchptr->fname[0] == 0)
  512.         continue;
  513.       strcpy (fname, searchptr->fname);
  514. + #ifdef atarist
  515. +     strcat (fname, "\\");
  516. + #else
  517.       strcat (fname, "/");
  518. + #endif
  519.       fname[strlen (fname) + flen] = 0;
  520.         } else {
  521.       fname[0] = 0;
  522. ***************
  523. *** 6627,6634 ****
  524. --- 6807,6818 ----
  525.     check_expand (op, len + 1);
  526.     if (op->bufp > op->buf && op->bufp[-1] != '\n')
  527.       *op->bufp++ = '\n';
  528. + #ifdef atarist
  529. +   op->bufp = slashifying_bcopy (line_cmd_buf, op->bufp, len);
  530. + #else
  531.     bcopy (line_cmd_buf, op->bufp, len);
  532.     op->bufp += len;
  533. + #endif
  534.     op->lineno = ip->lineno;
  535.   }
  536.   
  537. ***************
  538. *** 8199,8204 ****
  539. --- 8383,8389 ----
  540.     deps_buffer[deps_size] = 0;
  541.   }
  542.   
  543. + #if (!(defined(atarist) || defined(atariminix)))
  544.   #if defined(USG) || defined(VMS)
  545.   #ifndef BSTRING
  546.   
  547. ***************
  548. *** 8266,8272 ****
  549.   }
  550.   #endif /* not BSTRING */
  551.   #endif /* USG or VMS */
  552.   
  553.   static void
  554.   fatal (str, arg)
  555. --- 8451,8457 ----
  556.   }
  557.   #endif /* not BSTRING */
  558.   #endif /* USG or VMS */
  559. ! #endif /* any atari */
  560.   
  561.   static void
  562.   fatal (str, arg)
  563. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cp-tree.c    Tue Feb  4 10:32:23 1992
  564. --- cp-tree.c    Fri Mar  6 15:18:09 1992
  565. ***************
  566. *** 1619,1624 ****
  567. --- 1619,1625 ----
  568.     print_class_statistics ();
  569.   }
  570.   
  571. + #ifndef atarist
  572.   /* This is used by the `assert' macro.  It is provided in libgcc.a,
  573.      which `cc' doesn't know how to link.  */
  574.   void
  575. ***************
  576. *** 1639,1641 ****
  577. --- 1640,1643 ----
  578.     fflush (stderr);
  579.     abort ();
  580.   }
  581. + #endif
  582. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cp-xref.c    Fri Jan 17 17:58:44 1992
  583. --- cp-xref.c    Fri Mar  6 15:18:03 1992
  584. ***************
  585. *** 229,235 ****
  586.   
  587.     if (wd_name == NULL)
  588.       {
  589. ! #if defined(USG) || defined(VMS)
  590.         getcwd(wdbuf, sizeof(wdbuf));
  591.   #else
  592.         getwd(wdbuf);
  593. --- 229,235 ----
  594.   
  595.     if (wd_name == NULL)
  596.       {
  597. ! #if defined(USG) || defined(VMS) || defined(CROSSHPUX)
  598.         getcwd(wdbuf, sizeof(wdbuf));
  599.   #else
  600.         getwd(wdbuf);
  601. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/dbxout.c    Fri Feb 21 02:06:52 1992
  602. --- dbxout.c    Fri Mar  6 15:17:58 1992
  603. ***************
  604. *** 107,113 ****
  605.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  606.      the few exceptions to the general rule here.  */
  607.   
  608. ! #if !(defined (USG) || defined (VMS))
  609.   extern char *getwd ();
  610.   #define getcwd(buf,len) getwd(buf)
  611.   #define GUESSPATHLEN (MAXPATHLEN + 1)
  612. --- 107,113 ----
  613.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  614.      the few exceptions to the general rule here.  */
  615.   
  616. ! #if !(defined (USG) || defined (VMS) || defined(CROSSHPUX))
  617.   extern char *getwd ();
  618.   #define getcwd(buf,len) getwd(buf)
  619.   #define GUESSPATHLEN (MAXPATHLEN + 1)
  620. ***************
  621. *** 131,138 ****
  622.   #if defined (USG) || defined (MIPS)
  623.   #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  624.   #else
  625.   #include <stab.h>  /* On BSD, use the system's stab.h.  */
  626.   /* This is a GNU extension we need to reference in this file.  */
  627.   #ifndef N_CATCH
  628.   #define N_CATCH 0x54
  629. --- 131,141 ----
  630.   #if defined (USG) || defined (MIPS)
  631.   #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  632.   #else
  633. + #if defined(CROSSATARI) || defined(atarist) || defined(atariminix)
  634. + #include "astab.h"
  635. + #else
  636.   #include <stab.h>  /* On BSD, use the system's stab.h.  */
  637. ! #endif
  638.   /* This is a GNU extension we need to reference in this file.  */
  639.   #ifndef N_CATCH
  640.   #define N_CATCH 0x54
  641. ***************
  642. *** 415,422 ****
  643. --- 418,431 ----
  644.   #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
  645.       DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd);
  646.   #else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
  647. + #ifndef atarist
  648.       fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP,
  649.            cwd, N_SO, <ext_label_name[1]);
  650. + #else
  651. +     fprintf (asmfile, "%s \"", ASM_STABS_OP);
  652. +     atari_output_filename(asmfile, cwd);
  653. +     fprintf (asmfile, "\\\\\",%d,0,0,%s\n", N_SO, <ext_label_name[1]);
  654. + #endif
  655.   #endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
  656.         }
  657.     }
  658. ***************
  659. *** 429,436 ****
  660. --- 438,451 ----
  661.     /* We include outputting `Ltext:' here,
  662.        because that gives you a way to override it.  */
  663.     /* Used to put `Ltext:' before the reference, but that loses on sun 4.  */
  664. + #ifndef atarist
  665.     fprintf (asmfile, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP, input_file_name,
  666.          N_SO, <ext_label_name[1]);
  667. + #else
  668. +   fprintf (asmfile, "%s \"", ASM_STABS_OP);
  669. +   atari_output_filename(asmfile, input_file_name);
  670. +   fprintf(asmfile, "\",%d,0,0,%s\n", N_SO, <ext_label_name[1]);
  671. + #endif
  672.     text_section ();
  673.     ASM_OUTPUT_INTERNAL_LABEL (asmfile, "Ltext", 0);
  674.   #endif /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
  675. ***************
  676. *** 496,503 ****
  677. --- 511,524 ----
  678.         DBX_OUTPUT_SOURCE_FILENAME (file, filename);
  679.   #else
  680.         ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
  681. + #ifndef atarist
  682.         fprintf (file, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP,
  683.              filename, N_SOL, <ext_label_name[1]);
  684. + #else
  685. +       fprintf (file, "%s \"", ASM_STABS_OP);
  686. +       atari_output_filename(file, filename);
  687. +       fprintf (file, "\",%d,0,0,%s\n", N_SOL, <ext_label_name[1]);
  688. + #endif
  689.   #endif
  690.         lastfile = filename;
  691.       }
  692. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/final.c    Sat Feb  8 18:20:40 1992
  693. --- final.c    Fri Mar  6 15:18:04 1992
  694. ***************
  695. *** 67,74 ****
  696. --- 67,78 ----
  697.   #ifdef USG
  698.   #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  699.   #else
  700. + #if defined(CROSSATARI) || defined(atarist) || defined(atariminix)
  701. + #include "astab.h"
  702. + #else
  703.   #include <stab.h>  /* On BSD, use the system's stab.h.  */
  704.   #endif /* not USG */
  705. + #endif /* not atari */
  706.   #endif /* DBX_DEBUGGING_INFO */
  707.   
  708.   /* .stabd code for line number.  */
  709. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/gcc.c    Sat Feb 22 02:09:34 1992
  710. --- gcc.c    Fri Mar  6 15:17:57 1992
  711. ***************
  712. *** 30,35 ****
  713. --- 30,44 ----
  714.   Once it knows which kind of compilation to perform, the procedure for
  715.   compilation is specified by a string called a "spec".  */
  716.   
  717. + #ifdef CROSSATARI
  718. + #ifdef atarist
  719. + #undef atarist
  720. + #endif
  721. + #ifdef atariminix
  722. + #undef atariminix
  723. + #endif
  724. + #endif
  725. +   
  726.   #include <stdio.h>
  727.   #include <sys/types.h>
  728.   #include <ctype.h>
  729. ***************
  730. *** 36,47 ****
  731.   #include <signal.h>
  732.   #include <sys/file.h>
  733.   #include <sys/stat.h>
  734.   
  735.   #include "config.h"
  736.   #include "obstack.h"
  737.   #include "gvarargs.h"
  738.   
  739. ! #ifdef USG
  740.   #ifndef R_OK
  741.   #define R_OK 4
  742.   #define W_OK 2
  743. --- 45,59 ----
  744.   #include <signal.h>
  745.   #include <sys/file.h>
  746.   #include <sys/stat.h>
  747. + #ifdef CROSSATARI
  748. + #include <ctype.h>
  749. + #endif
  750.   
  751.   #include "config.h"
  752.   #include "obstack.h"
  753.   #include "gvarargs.h"
  754.   
  755. ! #if (defined(USG) || defined(atariminix))
  756.   #ifndef R_OK
  757.   #define R_OK 4
  758.   #define W_OK 2
  759. ***************
  760. *** 78,83 ****
  761. --- 90,102 ----
  762.   #endif
  763.   #endif
  764.   
  765. + #ifdef atarist
  766. + #include <osbind.h>
  767. + #include <ctype.h>
  768. + #include <fcntl.h>        /* fgth, for redirection of stderr */
  769. + long _stksize = 8192;
  770. + #endif
  771.   #define obstack_chunk_alloc xmalloc
  772.   #define obstack_chunk_free free
  773.   
  774. ***************
  775. *** 383,388 ****
  776. --- 402,410 ----
  777.           -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  778.       %{!undef:%{!ansi:%p} %P} %{trigraphs}\
  779.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  780. +         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
  781. +         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
  782. +         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
  783.           %{traditional-cpp:-traditional}\
  784.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  785.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
  786. ***************
  787. *** 392,398 ****
  788.              %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
  789.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  790.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  791. !               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  792.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  793.                         %{!pipe:%g.s} %A\n }}}}"},
  794.     {"-",
  795. --- 414,420 ----
  796.              %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
  797.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  798.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  799. !               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  800.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  801.                         %{!pipe:%g.s} %A\n }}}}"},
  802.     {"-",
  803. ***************
  804. *** 402,407 ****
  805. --- 424,432 ----
  806.           -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  807.       %{!undef:%{!ansi:%p} %P} %{trigraphs}\
  808.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  809. +         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
  810. +         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
  811. +         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
  812.           %{traditional-cpp:-traditional}\
  813.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  814.           %i %W{o*}}\
  815. ***************
  816. *** 414,419 ****
  817. --- 439,447 ----
  818.           -undef -D__OBJC__ -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  819.       %{!undef:%{!ansi:%p} %P} %{trigraphs}\
  820.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  821. +         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
  822. +         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
  823. +         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
  824.           %{traditional-cpp:-traditional}\
  825.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  826.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
  827. ***************
  828. *** 424,430 ****
  829.                  -lang-objc %{gen-decls} \
  830.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  831.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  832. !               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  833.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  834.                         %{!pipe:%g.s} %A\n }}}}"},
  835.     {".h", "@c-header"},
  836. --- 452,458 ----
  837.                  -lang-objc %{gen-decls} \
  838.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  839.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  840. !               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  841.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  842.                         %{!pipe:%g.s} %A\n }}}}"},
  843.     {".h", "@c-header"},
  844. ***************
  845. *** 436,441 ****
  846. --- 464,472 ----
  847.           -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  848.       %{!undef:%{!ansi:%p} %P} %{trigraphs}\
  849.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  850. +         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
  851. +         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
  852. +         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
  853.           %{traditional-cpp:-traditional}\
  854.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  855.           %i %W{o*}"},
  856. ***************
  857. *** 449,454 ****
  858. --- 480,488 ----
  859.       -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus \
  860.       %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
  861.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  862. +         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
  863. +         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
  864. +         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
  865.           %{traditional-cpp:-traditional} %{trigraphs}\
  866.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  867.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
  868. ***************
  869. *** 458,464 ****
  870.              %{v:-version} %{pg:-p} %{p} %{f*}\
  871.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  872.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  873. !               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  874.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  875.                         %{!pipe:%g.s} %A\n }}}}"},
  876.     {".i", "@cpp-output"},
  877. --- 492,498 ----
  878.              %{v:-version} %{pg:-p} %{p} %{f*}\
  879.              %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  880.              %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  881. !               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  882.                 %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  883.                         %{!pipe:%g.s} %A\n }}}}"},
  884.     {".i", "@cpp-output"},
  885. ***************
  886. *** 468,474 ****
  887.       %{v:-version} %{pg:-p} %{p} %{f*}\
  888.       %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  889.       %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  890. !     %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  891.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %{!pipe:%g.s} %A\n }"},
  892.     {".ii", "@c++-cpp-output"},
  893.     {"@c++-cpp-output",
  894. --- 502,508 ----
  895.       %{v:-version} %{pg:-p} %{p} %{f*}\
  896.       %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  897.       %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  898. !     %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  899.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %{!pipe:%g.s} %A\n }"},
  900.     {".ii", "@c++-cpp-output"},
  901.     {"@c++-cpp-output",
  902. ***************
  903. *** 477,488 ****
  904.           %{v:-version} %{pg:-p} %{p} %{f*}\
  905.           %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  906.           %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  907. !        %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  908.              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  909.              %{!pipe:%g.s} %A\n }"},
  910.     {".s", "@assembler"},
  911.     {"@assembler",
  912. !    "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  913.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i %A\n }"},
  914.     {".S", "@assembler-with-cpp"},
  915.     {"@assembler-with-cpp",
  916. --- 511,522 ----
  917.           %{v:-version} %{pg:-p} %{p} %{f*}\
  918.           %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  919.           %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  920. !        %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  921.              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  922.              %{!pipe:%g.s} %A\n }"},
  923.     {".s", "@assembler"},
  924.     {"@assembler",
  925. !    "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  926.               %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i %A\n }"},
  927.     {".S", "@assembler-with-cpp"},
  928.     {"@assembler-with-cpp",
  929. ***************
  930. *** 491,500 ****
  931.       %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{trigraphs} \
  932.           -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
  933.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  934.           %{traditional-cpp:-traditional}\
  935.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  936.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
  937. !     %{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  938.                       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  939.               %{!pipe:%g.s} %A\n }}}}"},
  940.     /* Mark end of table */
  941. --- 525,537 ----
  942.       %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{trigraphs} \
  943.           -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
  944.           %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
  945. +         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
  946. +         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
  947. +         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
  948.           %{traditional-cpp:-traditional}\
  949.       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
  950.           %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
  951. !     %{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  952.                       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  953.               %{!pipe:%g.s} %A\n }}}}"},
  954.     /* Mark end of table */
  955. ***************
  956. *** 508,513 ****
  957. --- 545,559 ----
  958.   
  959.   /* Here is the spec for running the linker, after compiling all files.  */
  960.   
  961. + #if (defined(CROSSATARI) || defined(atarist) || defined(atariminix))
  962. + static char *link_command_spec = 
  963. +  "%{!c:%{!M*:%{!E:%{!S:ld %{v} %{G} %{o*} %l\
  964. +  %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
  965. +  %{y*} %{!nostdlib:%S} \
  966. +  %{L*} %o %{!nostdlib:%s %L}\n }}}}";
  967. + #else
  968.   #ifdef LINK_LIBGCC_SPECIAL
  969.   /* Have gcc do the search.  */
  970.   static char *link_command_spec = "\
  971. ***************
  972. *** 523,528 ****
  973. --- 569,575 ----
  974.               %{!A:%{!nostdlib:%S}} \
  975.               %{L*} %D %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}";
  976.   #endif
  977. + #endif
  978.   
  979.   /* A vector of options to give to the linker.
  980.      These options are accumlated by %x
  981. ***************
  982. *** 530,535 ****
  983. --- 577,583 ----
  984.   static int n_linker_options;
  985.   static char **linker_options;
  986.   
  987. + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  988.   /* Read compilation specs from a file named FILENAME,
  989.      replacing the default ones.
  990.   
  991. ***************
  992. *** 667,672 ****
  993. --- 715,721 ----
  994.   
  995.     return p;
  996.   }
  997. + #endif /* ataris */
  998.   
  999.   /* Structure to keep track of the specs that have been defined so far.  These
  1000.      are accessed using %Sspecname in a compiler or link spec. */
  1001. ***************
  1002. *** 766,771 ****
  1003. --- 815,827 ----
  1004.   /* Name with which this program was invoked.  */
  1005.   
  1006.   static char *programname;
  1007. + #ifdef atarist
  1008. + /* Flag indicating, that stderr should be redirected for the child
  1009. +    processes */
  1010. + unsigned char zflag;
  1011. + #endif
  1012.   
  1013.   /* Structures to keep track of prefixes to try when looking for files. */
  1014.   
  1015. ***************
  1016. *** 1011,1019 ****
  1017.   static void
  1018.   choose_temp_base ()
  1019.   {
  1020. -   char *base = getenv ("TMPDIR");
  1021.     int len;
  1022.   
  1023.     if (base == (char *)0)
  1024.       {
  1025.   #ifdef P_tmpdir
  1026. --- 1067,1092 ----
  1027.   static void
  1028.   choose_temp_base ()
  1029.   {
  1030.     int len;
  1031. + #if (!(defined(atarist) || defined(atariminix)))
  1032. +   char *base = getenv ("TMPDIR");
  1033. + #else
  1034. +   char *base = getenv ("TEMP");
  1035.   
  1036. +   if(base == (char *)0)
  1037. +   {
  1038. +       base = getenv("TMPDIR");
  1039. +       if(base == (char *)0)
  1040. +       base = getenv("TMP");
  1041. +   }
  1042. +   if(base != (char *)0)
  1043. +   {
  1044. +       char *newbase = alloca(FILENAME_MAX);
  1045. +       dos2unx(base,newbase);
  1046. +       base = newbase;
  1047. +   }
  1048. + #endif
  1049.     if (base == (char *)0)
  1050.       {
  1051.   #ifdef P_tmpdir
  1052. ***************
  1053. *** 1032,1038 ****
  1054.     len = strlen (base);
  1055.     temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
  1056.     strcpy (temp_filename, base);
  1057. !   if (len > 0 && temp_filename[len-1] != '/')
  1058.       temp_filename[len++] = '/';
  1059.     strcpy (temp_filename + len, "ccXXXXXX");
  1060.   
  1061. --- 1105,1115 ----
  1062.     len = strlen (base);
  1063.     temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
  1064.     strcpy (temp_filename, base);
  1065. !   if (len > 0 && (temp_filename[len-1] != '/' 
  1066. ! #ifdef atarist
  1067. !           || temp_filename[len-1] != '\\'
  1068. ! #endif
  1069. !            ))
  1070.       temp_filename[len++] = '/';
  1071.     strcpy (temp_filename + len, "ccXXXXXX");
  1072.   
  1073. ***************
  1074. *** 1051,1057 ****
  1075.        int mode;
  1076.   {
  1077.     char *temp;
  1078. !   char *file_suffix = (mode & X_OK != 0 ? EXECUTABLE_SUFFIX : "");
  1079.     struct prefix_list *pl;
  1080.     int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
  1081.   
  1082. --- 1128,1134 ----
  1083.        int mode;
  1084.   {
  1085.     char *temp;
  1086. !   char *file_suffix = ((mode & X_OK) != 0 ? EXECUTABLE_SUFFIX : "");
  1087.     struct prefix_list *pl;
  1088.     int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
  1089.   
  1090. ***************
  1091. *** 1273,1278 ****
  1092. --- 1350,1356 ----
  1093.   
  1094.   #else /* not __MSDOS__ */
  1095.   
  1096. + #ifndef atarist
  1097.   static int
  1098.   pexecute (func, program, argv, not_last)
  1099.        char *program;
  1100. ***************
  1101. *** 1360,1365 ****
  1102. --- 1438,1444 ----
  1103.       }
  1104.   }
  1105.   
  1106. + #endif /* not atarist */
  1107.   #endif /* not __MSDOS__ */
  1108.   
  1109.   /* Execute the command specified by the arguments on the current line of spec.
  1110. ***************
  1111. *** 1378,1393 ****
  1112.       {
  1113.         char *prog;        /* program name.  */
  1114.         char **argv;        /* vector of args.  */
  1115.         int pid;            /* pid of process for this command.  */
  1116.       };
  1117.   
  1118.     struct command *commands;    /* each command buffer with above info.  */
  1119.   
  1120.     /* Count # of piped commands.  */
  1121.     for (n_commands = 1, i = 0; i < argbuf_index; i++)
  1122.       if (strcmp (argbuf[i], "|") == 0)
  1123.         n_commands++;
  1124.     /* Get storage for each command.  */
  1125.     commands
  1126.       = (struct command *) alloca (n_commands * sizeof (struct command));
  1127. --- 1457,1477 ----
  1128.       {
  1129.         char *prog;        /* program name.  */
  1130.         char **argv;        /* vector of args.  */
  1131. + #ifndef atarist
  1132.         int pid;            /* pid of process for this command.  */
  1133. + #endif
  1134.       };
  1135.   
  1136.     struct command *commands;    /* each command buffer with above info.  */
  1137.   
  1138. + #ifndef atarist
  1139.     /* Count # of piped commands.  */
  1140.     for (n_commands = 1, i = 0; i < argbuf_index; i++)
  1141.       if (strcmp (argbuf[i], "|") == 0)
  1142.         n_commands++;
  1143. ! #else
  1144. !   n_commands = 1;
  1145. ! #endif
  1146.     /* Get storage for each command.  */
  1147.     commands
  1148.       = (struct command *) alloca (n_commands * sizeof (struct command));
  1149. ***************
  1150. *** 1402,1407 ****
  1151. --- 1486,1492 ----
  1152.     if (string)
  1153.       commands[0].argv[0] = string;
  1154.   
  1155. + #ifndef atarist
  1156.     for (n_commands = 1, i = 0; i < argbuf_index; i++)
  1157.       if (strcmp (argbuf[i], "|") == 0)
  1158.         {                /* each command.  */
  1159. ***************
  1160. *** 1416,1421 ****
  1161. --- 1501,1509 ----
  1162.         commands[n_commands].argv[0] = string;
  1163.       n_commands++;
  1164.         }
  1165. + #else
  1166. +   n_commands = 1;
  1167. + #endif
  1168.   
  1169.     argbuf[argbuf_index] = 0;
  1170.   
  1171. ***************
  1172. *** 1431,1439 ****
  1173. --- 1519,1529 ----
  1174.         for (j = commands[i].argv; *j; j++)
  1175.           fprintf (stderr, " %s", *j);
  1176.   
  1177. + #ifndef atarist
  1178.         /* Print a pipe symbol after all but the last command.  */
  1179.         if (i + 1 != n_commands)
  1180.           fprintf (stderr, " |");
  1181. + #endif
  1182.         fprintf (stderr, "\n");
  1183.       }
  1184.         fflush (stderr);
  1185. ***************
  1186. *** 1448,1458 ****
  1187. --- 1538,1550 ----
  1188.   #endif /* DEBUG */
  1189.       }
  1190.   
  1191. + #ifndef atarist
  1192.     /* Run each piped subprocess.  */
  1193.   
  1194.     last_pipe_input = STDIN_FILE_NO;
  1195.     for (i = 0; i < n_commands; i++)
  1196.       {
  1197. + #ifndef atariminix
  1198.         char *string = commands[i].argv[0];
  1199.   
  1200.         commands[i].pid = pexecute ((string != commands[i].prog ? execv : execvp),
  1201. ***************
  1202. *** 1459,1464 ****
  1203. --- 1551,1564 ----
  1204.                     string, commands[i].argv,
  1205.                     i + 1 < n_commands);
  1206.   
  1207. + #else
  1208. +       extern int execv();
  1209. +       char *string = commands[i].argv[0];
  1210. +       commands[i].pid = pexecute (execv,
  1211. +                   string, commands[i].argv,
  1212. +                   i + 1 < n_commands);
  1213. + #endif
  1214.         if (string != commands[i].prog)
  1215.       free (string);
  1216.       }
  1217. ***************
  1218. *** 1502,1507 ****
  1219. --- 1602,1652 ----
  1220.         }
  1221.       return ret_code;
  1222.     }
  1223. + #else /* atarist */
  1224. +  {
  1225. +      register int iii;
  1226. +      int errfd, oldfd;
  1227. +      char **j;
  1228. +      execution_count++;
  1229. +      if (zflag)
  1230. +        {
  1231. +      errfd = Fopen("compile.err", 2);
  1232. +      if (errfd < __SMALLEST_VALID_HANDLE)
  1233. +        errfd = Fcreate("compile.err", 0);
  1234. +      else
  1235. +        Fseek(0L, errfd, 2);
  1236. +      if (errfd >= __SMALLEST_VALID_HANDLE)
  1237. +        {
  1238. +          oldfd = Fdup (2);
  1239. +          Fforce(2, errfd);
  1240. +        }
  1241. +      else
  1242. +        {
  1243. +          error("cannot open %s", "compile.err");
  1244. +          zflag = 0;        /* no redirection */
  1245. +        }
  1246. +        }
  1247. +      for (i = 0; i < n_commands ; i++)
  1248. +      {
  1249. +          j = commands[i].argv;
  1250. +          iii = spawnve(0, j[0], j, NULL);
  1251. +      if(iii != 0)
  1252. +          break;
  1253. +      }
  1254. +      if (zflag)
  1255. +        {
  1256. +      Fforce(2, oldfd);
  1257. +      Fclose(oldfd);
  1258. +      Fclose(errfd);
  1259. +        }
  1260. +      if (iii != 0)
  1261. +        return -1;
  1262. +      else
  1263. +        return 0;
  1264. +  }
  1265. + #endif /* atarist */  
  1266.   }
  1267.   
  1268.   /* Find all the switches given to us
  1269. ***************
  1270. *** 1770,1775 ****
  1271. --- 1915,1926 ----
  1272.             save_temps_flag = 1;
  1273.             break;
  1274.           }
  1275. + #ifdef atarist
  1276. +         case 'z':    /* redirect stderr to a file */
  1277. +           zflag++;
  1278. +           n_switches++;
  1279. +           break;
  1280. + #endif
  1281.           default:
  1282.             n_switches++;
  1283.   
  1284. ***************
  1285. *** 1941,1946 ****
  1286. --- 2092,2106 ----
  1287.      search dirs for it.  */
  1288.   static int this_is_library_file;
  1289.   
  1290. + #ifdef atarist
  1291. + /* I don't know why this is necessary.  Recursive calls to do_spec_1
  1292. +    end up ignoring the error code from calls to execute().  That causes
  1293. +    do_spec to get a 0 return value, and do_spec_1("\n"), which causes the
  1294. +    command to get executed again.
  1295. + */
  1296. + int execute_return_error = 0;
  1297. + #endif
  1298.   /* Process the spec SPEC and run the commands specified therein.
  1299.      Returns 0 if the spec is successfully processed; -1 if failed.  */
  1300.   
  1301. ***************
  1302. *** 1960,1969 ****
  1303. --- 2120,2138 ----
  1304.   
  1305.     /* Force out any unfinished command.
  1306.        If -pipe, this forces out the last command if it ended in `|'.  */
  1307. + #ifdef atarist
  1308. +   if (!value && execute_return_error)
  1309. +     {
  1310. +     value = execute_return_error;
  1311. +     execute_return_error = 0;
  1312. +     }
  1313. + #endif
  1314.     if (value == 0)
  1315.       {
  1316. + #ifndef atarist
  1317.         if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|"))
  1318.       argbuf_index--;
  1319. + #endif
  1320.   
  1321.         if (argbuf_index > 0)
  1322.       value = execute ();
  1323. ***************
  1324. *** 2000,2005 ****
  1325. --- 2169,2225 ----
  1326.          Otherwise, NL, SPC, TAB and % are special.  */
  1327.       switch (inswitch ? 'a' : c)
  1328.         {
  1329. + #if (defined(atarist) || defined(CROSSATARI))
  1330. + /* this stuff added by jrd.  if see '$', expect name of env var, delimited
  1331. +    by '$'.  Find it's value, and subst it in.
  1332. +    modified by ERS to only collect things that look like names; this
  1333. +    saves e.g. the -$ arg. to cpp from getting munged */
  1334. +       case '$':
  1335. +       {
  1336. +     char varname[32];        /* should be enough */
  1337. +     char * value;            /* deciphered value string */
  1338. +     char *temp;
  1339. +     int i;
  1340. +     extern char *getenv(), *index();
  1341. +     
  1342. +     for (i = 0 ; ((c = *p) != '$') && isalnum(c) && i < 31 ; i++, p++)
  1343. +         varname[i] = c;
  1344. +     varname[i] = '\0';
  1345. +     if (strlen(varname) > 0) /* ++jrb fix */
  1346. +     {
  1347. +                  ++p;    /* skip trailing '$' */
  1348. +         value = getenv(varname); /* ++jrb fix */
  1349. +         if (value)
  1350. +         { /* if value is a path, only consider 1'st component */
  1351. + #ifdef atarist
  1352. +             if((temp = index(value, ',')) == NULL)
  1353. +                 temp = index(value, ';');
  1354. + #else
  1355. +             temp = index(value, ':');
  1356. + #endif
  1357. +             if(temp != NULL)
  1358. +             {
  1359. +                 char *t = (char *) alloca(strlen(value) + 1);
  1360. +                 strcpy(t, value);
  1361. +                 t[temp-value] = '\0';
  1362. +                 do_spec_1(t, 0);
  1363. +             }
  1364. +             else
  1365. +                 do_spec_1(value, 0);
  1366. +         }
  1367. +             else
  1368. +             do_spec_1(".", 0);    /* a compleat kludge... */
  1369. +     }
  1370. +         else
  1371. +         {
  1372. +              obstack_1grow(&obstack, '$');
  1373. +              arg_going = 1;
  1374. +         }
  1375. +       }
  1376. +      break;
  1377. + #endif /* atarist */
  1378.         case '\n':
  1379.       /* End of line: finish any pending argument,
  1380.          then run the pending command if one has been started.  */
  1381. ***************
  1382. *** 2037,2042 ****
  1383. --- 2257,2266 ----
  1384.       if (argbuf_index > 0)
  1385.         {
  1386.           int value = execute ();
  1387. + #ifdef atarist
  1388. +         if (!execute_return_error)
  1389. +             execute_return_error = value;
  1390. + #endif
  1391.           if (value)
  1392.             return value;
  1393.         }
  1394. ***************
  1395. *** 2521,2533 ****
  1396. --- 2745,2765 ----
  1397.           break;
  1398.   
  1399.         default:
  1400. + #if 1 /* atarist */
  1401. +         fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
  1402. +         c, (p - spec - 1), spec);
  1403. + #endif
  1404.           abort ();
  1405.         }
  1406.       break;
  1407.   
  1408. + #ifndef atarist
  1409. +       /* on the atari it is important to preserve backslash in spec */
  1410. +       /* so just let it go into default case */
  1411.         case '\\':
  1412.       /* Backslash: treat next character as ordinary.  */
  1413.       c = *p++;
  1414. + #endif
  1415.   
  1416.       /* fall through */
  1417.         default:
  1418. ***************
  1419. *** 2794,2799 ****
  1420. --- 3026,3032 ----
  1421.   
  1422.   /* On fatal signals, delete all the temporary files.  */
  1423.   
  1424. + #ifndef atarist
  1425.   static void
  1426.   fatal_error (signum)
  1427.        int signum;
  1428. ***************
  1429. *** 2805,2810 ****
  1430. --- 3038,3044 ----
  1431.        so its normal effect occurs.  */
  1432.     kill (getpid (), signum);
  1433.   }
  1434. + #endif
  1435.   
  1436.   int
  1437.   main (argc, argv)
  1438. ***************
  1439. *** 2818,2823 ****
  1440. --- 3052,3062 ----
  1441.     char *explicit_link_files;
  1442.     char *specs_file;
  1443.   
  1444. + #ifdef atarist
  1445. + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
  1446. + /*  _malloczero(1); */     /* zero mallocs by default */
  1447. +   programname = "gcc";
  1448. + #else  
  1449.     programname = argv[0];
  1450.   
  1451.     if (signal (SIGINT, SIG_IGN) != SIG_IGN)
  1452. ***************
  1453. *** 2830,2835 ****
  1454. --- 3069,3075 ----
  1455.     if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
  1456.       signal (SIGPIPE, fatal_error);
  1457.   #endif
  1458. + #endif /* atarist */
  1459.   
  1460.     argbuf_length = 10;
  1461.     argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
  1462. ***************
  1463. *** 2846,2851 ****
  1464. --- 3086,3100 ----
  1465.   
  1466.     process_command (argc, argv);
  1467.   
  1468. + #if (defined(atarist) || defined(CROSSATARI))
  1469. +   {
  1470. +     char *temp;
  1471. +     
  1472. +     if((temp = getenv ("GCCEXEC")))
  1473. +     add_prefix (&exec_prefix, temp, 0, 0, 0);
  1474. +   }
  1475. + #endif
  1476. +   
  1477.     /* Initialize the vector of specs to just the default.
  1478.        This means one element containing 0s, as a terminator.  */
  1479.   
  1480. ***************
  1481. *** 2853,2858 ****
  1482. --- 3102,3111 ----
  1483.     bcopy (default_compilers, compilers, sizeof default_compilers);
  1484.     n_compilers = n_default_compilers;
  1485.   
  1486. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  1487. +   specs_file = 0;
  1488. + #else
  1489.     /* Read specs from a file if there is one.  */
  1490.   
  1491.     machine_suffix = concat (spec_machine, "/", concat (spec_version, "/", ""));
  1492. ***************
  1493. *** 2861,2866 ****
  1494. --- 3114,3120 ----
  1495.     /* Read the specs file unless it is a default one.  */
  1496.     if (specs_file != 0 && strcmp (specs_file, "specs"))
  1497.       read_specs (specs_file);
  1498. + #endif
  1499.   
  1500.     /* Now we have the specs.
  1501.        Set the `valid' bits for switches that match anything in any spec.  */
  1502. ***************
  1503. *** 2877,2883 ****
  1504. --- 3131,3143 ----
  1505.   
  1506.     if (verbose_flag)
  1507.       {
  1508. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  1509. + #include "PatchLev.h"
  1510. +       fprintf (stderr, "gcc-atariST version %s Patchlevel %s\n",
  1511. +            version_string, PatchLevel);
  1512. + #else
  1513.         fprintf (stderr, "gcc version %s\n", version_string);
  1514. + #endif
  1515.         if (n_infiles == 0)
  1516.       exit (0);
  1517.       }
  1518. ***************
  1519. *** 2924,2930 ****
  1520. --- 3184,3195 ----
  1521.   
  1522.         input_basename = input_filename;
  1523.         for (p = input_filename; *p; p++)
  1524. + #ifdef atarist
  1525. +         if (((*p == '/') || (*p == '\\')) && (*(p-1) != ':'))
  1526. +             /* allow both '\' and '/' with  our new lib */
  1527. + #else
  1528.           if (*p == '/')
  1529. + #endif
  1530.             input_basename = p + 1;
  1531.   
  1532.         /* Find a suffix starting with the last period,
  1533. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/libgcc1.c    Fri Feb 14 22:39:14 1992
  1534. --- libgcc1.c    Fri Mar  6 15:17:56 1992
  1535. ***************
  1536. *** 201,207 ****
  1537.   #endif
  1538.   
  1539.   #ifndef perform_lesf2
  1540. ! #define perform_lesf2(a, b) return 1 - (a >= b);
  1541.   #endif
  1542.   
  1543.   /* Define the C data type to use for an SImode value.  */
  1544. --- 201,207 ----
  1545.   #endif
  1546.   
  1547.   #ifndef perform_lesf2
  1548. ! #define perform_lesf2(a, b) return 1 - (a <= b);
  1549.   #endif
  1550.   
  1551.   /* Define the C data type to use for an SImode value.  */
  1552. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/protoize.c    Tue Feb 18 15:42:08 1992
  1553. --- protoize.c    Fri Mar  6 15:18:02 1992
  1554. ***************
  1555. *** 150,156 ****
  1556.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  1557.      the few exceptions to the general rule here.  */
  1558.   
  1559. ! #if !(defined (USG) || defined (VMS))
  1560.   extern char *getwd ();
  1561.   #define getcwd(buf,len) getwd(buf)
  1562.   #else /* (defined (USG) || defined (VMS)) */
  1563. --- 150,156 ----
  1564.      BSD systems) now provides getcwd as called for by POSIX.  Allow for
  1565.      the few exceptions to the general rule here.  */
  1566.   
  1567. ! #if !(defined (USG) || defined (VMS) || defined(CROSSHPUX))
  1568.   extern char *getwd ();
  1569.   #define getcwd(buf,len) getwd(buf)
  1570.   #else /* (defined (USG) || defined (VMS)) */
  1571. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/toplev.c    Tue Feb 18 20:07:07 1992
  1572. --- toplev.c    Fri Mar  6 15:17:59 1992
  1573. ***************
  1574. *** 31,37 ****
  1575.   
  1576.   #include <sys/stat.h>
  1577.   
  1578. ! #ifdef USG
  1579.   #undef FLOAT
  1580.   #include <sys/param.h>
  1581.   /* This is for hpux.  It is a real screw.  They should change hpux.  */
  1582. --- 31,37 ----
  1583.   
  1584.   #include <sys/stat.h>
  1585.   
  1586. ! #if defined(USG) || defined(CROSSHPUX)
  1587.   #undef FLOAT
  1588.   #include <sys/param.h>
  1589.   /* This is for hpux.  It is a real screw.  They should change hpux.  */
  1590. ***************
  1591. *** 41,51 ****
  1592. --- 41,59 ----
  1593.   #undef FFS  /* Some systems define this in param.h.  */
  1594.   #else
  1595.   #ifndef VMS
  1596. + #if (!(defined(atarist) || defined(atariminix)))
  1597.   #include <sys/time.h>
  1598.   #include <sys/resource.h>
  1599. + #endif /* !(atarist || atariminix) */
  1600.   #endif
  1601.   #endif
  1602.   
  1603. + #ifdef atariminix
  1604. + #include <sys/times.h>
  1605. + /* #include <minix/const.h>, avoid dragging this in */
  1606. + #define HZ 60    /* this is the only thing needed from minix/const.h */
  1607. + #endif
  1608.   #include "input.h"
  1609.   #include "tree.h"
  1610.   /* #include "c-tree.h" */
  1611. ***************
  1612. *** 52,57 ****
  1613. --- 60,74 ----
  1614.   #include "rtl.h"
  1615.   #include "flags.h"
  1616.   #include "insn-attr.h"
  1617. + #ifdef atarist
  1618. + long _stksize = -1L;    /* for all sizes of ST's */
  1619. +     /* -1 means malloc from own heap and keep all  of memory */
  1620. + #endif /* atarist */
  1621. + #if (defined(atarist) || defined(atariminix))
  1622. + #include "astab.h"    /* need this for ASM_OUTPUT_SOURCE_FILENAME */
  1623. + #endif
  1624.   
  1625.   #ifdef VMS
  1626.   /* The extra parameters substantially improve the I/O performance.  */
  1627. ***************
  1628. *** 578,584 ****
  1629.   int
  1630.   get_run_time ()
  1631.   {
  1632. ! #ifdef USG
  1633.     struct tms tms;
  1634.   #else
  1635.   #ifndef VMS
  1636. --- 595,604 ----
  1637.   int
  1638.   get_run_time ()
  1639.   {
  1640. ! #ifdef atarist
  1641. !   long now;
  1642. ! #else
  1643. ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
  1644.     struct tms tms;
  1645.   #else
  1646.   #ifndef VMS
  1647. ***************
  1648. *** 593,603 ****
  1649.       } vms_times;
  1650.   #endif
  1651.   #endif
  1652.   
  1653.     if (quiet_flag)
  1654.       return 0;
  1655.   
  1656. ! #ifdef USG
  1657.     times (&tms);
  1658.     return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  1659.   #else
  1660. --- 613,627 ----
  1661.       } vms_times;
  1662.   #endif
  1663.   #endif
  1664. + #endif
  1665.   
  1666.     if (quiet_flag)
  1667.       return 0;
  1668.   
  1669. ! #ifdef atarist
  1670. !   return(time(NULL) * 1000000);
  1671. ! #else
  1672. ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
  1673.     times (&tms);
  1674.     return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  1675.   #else
  1676. ***************
  1677. *** 610,615 ****
  1678. --- 634,640 ----
  1679.     return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
  1680.   #endif
  1681.   #endif
  1682. + #endif
  1683.   }
  1684.   
  1685.   #define TIMEVAR(VAR, BODY)    \
  1686. ***************
  1687. *** 1212,1217 ****
  1688. --- 1237,1243 ----
  1689.     longjmp (float_handler, 1);
  1690.   }
  1691.   
  1692. + #ifndef atarist
  1693.   /* Handler for SIGPIPE.  */
  1694.   
  1695.   static void
  1696. ***************
  1697. *** 1221,1226 ****
  1698. --- 1247,1253 ----
  1699.   {
  1700.     fatal ("output pipe has been closed");
  1701.   }
  1702. + #endif
  1703.   
  1704.   /* Strip off a legitimate source ending from the input string NAME of
  1705.      length LEN. */
  1706. ***************
  1707. *** 1372,1378 ****
  1708. --- 1399,1409 ----
  1709.       {
  1710.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1711.         strcpy (dumpname, dump_base_name);
  1712. + #ifndef atarist
  1713.         strcat (dumpname, ".jump");
  1714. + #else
  1715. +       strcat (dumpname, ".jmp");
  1716. + #endif
  1717.         jump_opt_dump_file = fopen (dumpname, "w");
  1718.         if (jump_opt_dump_file == 0)
  1719.       pfatal_with_name (dumpname);
  1720. ***************
  1721. *** 1394,1400 ****
  1722. --- 1425,1435 ----
  1723.       {
  1724.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1725.         strcpy (dumpname, dump_base_name);
  1726. + #ifndef atarist
  1727.         strcat (dumpname, ".loop");
  1728. + #else
  1729. +       strcat (dumpname, ".lop");
  1730. + #endif
  1731.         loop_dump_file = fopen (dumpname, "w");
  1732.         if (loop_dump_file == 0)
  1733.       pfatal_with_name (dumpname);
  1734. ***************
  1735. *** 1405,1411 ****
  1736. --- 1440,1450 ----
  1737.       {
  1738.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1739.         strcpy (dumpname, dump_base_name);
  1740. + #ifndef atarist
  1741.         strcat (dumpname, ".cse2");
  1742. + #else
  1743. +       strcat (dumpname, ".cs2");
  1744. + #endif
  1745.         cse2_dump_file = fopen (dumpname, "w");
  1746.         if (cse2_dump_file == 0)
  1747.       pfatal_with_name (dumpname);
  1748. ***************
  1749. *** 1416,1422 ****
  1750. --- 1455,1465 ----
  1751.       {
  1752.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1753.         strcpy (dumpname, dump_base_name);
  1754. + #ifndef atarist
  1755.         strcat (dumpname, ".flow");
  1756. + #else
  1757. +       strcat (dumpname, ".flo");
  1758. + #endif
  1759.         flow_dump_file = fopen (dumpname, "w");
  1760.         if (flow_dump_file == 0)
  1761.       pfatal_with_name (dumpname);
  1762. ***************
  1763. *** 1427,1433 ****
  1764. --- 1470,1480 ----
  1765.       {
  1766.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
  1767.         strcpy (dumpname, dump_base_name);
  1768. + #ifndef atarist
  1769.         strcat (dumpname, ".combine");
  1770. + #else
  1771. +       strcat (dumpname, ".cmb");
  1772. + #endif
  1773.         combine_dump_file = fopen (dumpname, "w");
  1774.         if (combine_dump_file == 0)
  1775.       pfatal_with_name (dumpname);
  1776. ***************
  1777. *** 1438,1444 ****
  1778. --- 1485,1495 ----
  1779.       {
  1780.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
  1781.         strcpy (dumpname, dump_base_name);
  1782. + #ifndef atarist
  1783.         strcat (dumpname, ".sched");
  1784. + #else
  1785. +       strcat (dumpname, ".sch");
  1786. + #endif
  1787.         sched_dump_file = fopen (dumpname, "w");
  1788.         if (sched_dump_file == 0)
  1789.       pfatal_with_name (dumpname);
  1790. ***************
  1791. *** 1449,1455 ****
  1792. --- 1500,1510 ----
  1793.       {
  1794.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1795.         strcpy (dumpname, dump_base_name);
  1796. + #ifndef atarist
  1797.         strcat (dumpname, ".lreg");
  1798. + #else
  1799. +       strcat (dumpname, ".lrg");
  1800. + #endif
  1801.         local_reg_dump_file = fopen (dumpname, "w");
  1802.         if (local_reg_dump_file == 0)
  1803.       pfatal_with_name (dumpname);
  1804. ***************
  1805. *** 1460,1466 ****
  1806. --- 1515,1525 ----
  1807.       {
  1808.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
  1809.         strcpy (dumpname, dump_base_name);
  1810. + #ifndef atarist
  1811.         strcat (dumpname, ".greg");
  1812. + #else
  1813. +       strcat (dumpname, ".grg");
  1814. + #endif
  1815.         global_reg_dump_file = fopen (dumpname, "w");
  1816.         if (global_reg_dump_file == 0)
  1817.       pfatal_with_name (dumpname);
  1818. ***************
  1819. *** 1471,1477 ****
  1820. --- 1530,1540 ----
  1821.       {
  1822.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 8);
  1823.         strcpy (dumpname, dump_base_name);
  1824. + #ifndef atarist
  1825.         strcat (dumpname, ".sched2");
  1826. + #else
  1827. +       strcat (dumpname, ".sc2");
  1828. + #endif
  1829.         sched2_dump_file = fopen (dumpname, "w");
  1830.         if (sched2_dump_file == 0)
  1831.       pfatal_with_name (dumpname);
  1832. ***************
  1833. *** 1482,1488 ****
  1834. --- 1545,1555 ----
  1835.       {
  1836.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
  1837.         strcpy (dumpname, dump_base_name);
  1838. + #ifndef atarist
  1839.         strcat (dumpname, ".jump2");
  1840. + #else
  1841. +       strcat (dumpname, ".jp2");
  1842. + #endif
  1843.         jump2_opt_dump_file = fopen (dumpname, "w");
  1844.         if (jump2_opt_dump_file == 0)
  1845.       pfatal_with_name (dumpname);
  1846. ***************
  1847. *** 1506,1512 ****
  1848. --- 1573,1583 ----
  1849.       {
  1850.         register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
  1851.         strcpy (dumpname, dump_base_name);
  1852. + #ifndef atarist
  1853.         strcat (dumpname, ".stack");
  1854. + #else
  1855. +       strcat (dumpname, ".stk");
  1856. + #endif
  1857.         stack_reg_dump_file = fopen (dumpname, "w");
  1858.         if (stack_reg_dump_file == 0)
  1859.       pfatal_with_name (dumpname);
  1860. ***************
  1861. *** 2484,2495 ****
  1862. --- 2555,2576 ----
  1863.     int version_flag = 0;
  1864.     char *p;
  1865.   
  1866. + #ifdef atarist
  1867. + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
  1868. + /*  _malloczero(1); */     /* zero mallocs by default */
  1869. + #endif  
  1870.     /* save in case md file wants to emit args as a comment.  */
  1871.     save_argc = argc;
  1872.     save_argv = argv;
  1873.   
  1874.     p = argv[0] + strlen (argv[0]);
  1875. + #ifndef atarist
  1876.     while (p != argv[0] && p[-1] != '/') --p;
  1877. + #else
  1878. +   while (p != argv[0] && ( ((p[-1] != '/') || (p[-1] != '\\')) &&
  1879. +               (p[-2] != ':') ) ) --p;
  1880. + #endif
  1881.     progname = p;
  1882.   
  1883.   #ifdef RLIMIT_STACK
  1884. ***************
  1885. *** 2506,2512 ****
  1886. --- 2587,2595 ----
  1887.   
  1888.     signal (SIGFPE, float_signal);
  1889.   
  1890. + #ifndef atarist
  1891.     signal (SIGPIPE, pipe_closed);
  1892. + #endif
  1893.   
  1894.     decl_printable_name = decl_name;
  1895.     lang_expand_expr = (struct rtx_def *(*)()) do_abort;
  1896. ***************
  1897. *** 2589,2595 ****
  1898. --- 2672,2688 ----
  1899.         else if (!strcmp (str, "dumpbase"))
  1900.           {
  1901.             dump_base_name = argv[++i];
  1902. + #ifdef atarist
  1903. + /* dump_base_name will typically be 'foo.c' here.  Need to truncate at the '.',
  1904. +    cause dots mean something here */
  1905. +         {
  1906. +           char * n = dump_base_name;
  1907. +           for ( ; ((*n) && (*n != '.')) ; )
  1908. +         n++;
  1909. +           *n = '\0';
  1910.           }
  1911. + #endif
  1912. +         }
  1913.         else if (str[0] == 'd')
  1914.           {
  1915.             register char *p = &str[1];
  1916. ***************
  1917. *** 2932,2938 ****
  1918. --- 3025,3037 ----
  1919.        option flags in use.  */
  1920.     if (version_flag)
  1921.       {
  1922. + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
  1923. + #include "PatchLev.h"
  1924. +         fprintf (stderr, "%s version %s-atariST Patchlevel %s",
  1925. +          language_string, version_string, PatchLevel);
  1926. + #else
  1927.         fprintf (stderr, "%s version %s", language_string, version_string);
  1928. + #endif
  1929.   #ifdef TARGET_VERSION
  1930.         TARGET_VERSION;
  1931.   #endif
  1932. ***************
  1933. *** 2953,2958 ****
  1934. --- 3052,3059 ----
  1935.   
  1936.     compile_file (filename);
  1937.   
  1938. + #if (!(defined(atarist) || defined(atariminix)))
  1939. + #if (!(defined(CROSSHPUX)))
  1940.   #ifndef VMS
  1941.     if (flag_print_mem)
  1942.       {
  1943. ***************
  1944. *** 2969,2974 ****
  1945. --- 3070,3077 ----
  1946.   #endif /* not USG */
  1947.       }
  1948.   #endif /* not VMS */
  1949. + #endif
  1950. + #endif
  1951.   
  1952.     if (errorcount)
  1953.       exit (FATAL_EXIT_CODE);
  1954. ***************
  1955. *** 3080,3082 ****
  1956. --- 3183,3216 ----
  1957.   
  1958.     fprintf (stderr, "\n");
  1959.   }
  1960. + #ifdef atarist
  1961. + void atari_output_filename(file, filename)
  1962. + FILE *file;
  1963. + char *filename;
  1964. + {
  1965. +     if( (!file) || (!filename) ) return;
  1966. +     for(; *filename; filename++)
  1967. +     {
  1968. +     if(*filename == '\\') putc('\\', file);
  1969. +     putc(*filename, file);
  1970. +     }
  1971. + }
  1972. + #include <string.h>
  1973. + char *atari_filename_nondirectory(p)
  1974. + char *p;
  1975. + {
  1976. +     char *s;
  1977. +     
  1978. +     for(s = p + strlen(p); s != p; --s)
  1979. +     {
  1980. +     if((*s == '/') || (*s == '\\'))
  1981. +         break;
  1982. +     }
  1983. +     
  1984. +     return (s == p) ? p : s+1;
  1985. + }
  1986. + #endif
  1987. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cp-parse.y    Sat Feb 22 03:35:51 1992
  1988. --- cp-parse.y    Fri Mar  6 15:18:09 1992
  1989. ***************
  1990. *** 1075,1081 ****
  1991.               }
  1992.             $$ = build_delete (type, expr, integer_three_node,
  1993.                        LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE,
  1994. !                      TYPE_HAS_DESTRUCTOR (TREE_TYPE (type)) ? $$ : 0, 1);
  1995.           }
  1996.       | delete '[' ']' cast_expr  %prec UNARY
  1997.           {
  1998. --- 1075,1082 ----
  1999.               }
  2000.             $$ = build_delete (type, expr, integer_three_node,
  2001.                        LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE,
  2002. !                      TYPE_HAS_DESTRUCTOR (TREE_TYPE (type)) ? $$ : 0,
  2003. !                      0); /*miron@cs.sfu.ca*/
  2004.           }
  2005.       | delete '[' ']' cast_expr  %prec UNARY
  2006.           {
  2007. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/fixinc.svr4    Tue Feb 11 22:11:45 1992
  2008. --- fixinc.svr4    Fri Mar  6 15:17:54 1992
  2009. ***************
  2010. *** 155,176 ****
  2011.           s/#machine(\([^)]*\))/defined(__\1__)/g
  2012.           s/#system(\([^)]*\))/defined(__\1__)/g
  2013.           s/#cpu(\([^)]*\))/defined(__\1__)/g
  2014. !       /#[a-z]*if.*[ (]m68k/        s/m68k/__m68k__/g
  2015. !       /#[a-z]*if.*[ (]__i386/    s/__i386/__i386__/g
  2016. !       /#[a-z]*if.*[ (]i386/        s/i386/__i386__/g
  2017. !       /#[a-z]*if.*[ (]sparc/    s/sparc/__sparc__/g
  2018. !       /#[a-z]*if.*[ (]mc68000/    s/mc68000/__mc68000__/g
  2019. !       /#[a-z]*if.*[ (]vax/        s/vax/__vax__/g
  2020. !       /#[a-z]*if.*[ (]sun3x/    s/sun3x/__sun3x__/g
  2021. !       /#[a-z]*if.*[ (]sun3/        s/sun3/__sun3__/g
  2022. !       /#[a-z]*if.*[ (]sun2/        s/sun2/__sun2__/g
  2023. !       /#[a-z]*if.*[ (]sun4c/    s/sun4c/__sun4c__/g
  2024. !       /#[a-z]*if.*[ (]sun4/        s/sun4/__sun4__/g
  2025. !       /#[a-z]*if.*[ (]sun/        s/sun/__sun__/g
  2026. !       /#[a-z]*if.*[ (]ns32000/    s/ns32000/__ns32000__/g
  2027. !       /#[a-z]*if.*[ (]pyr/        s/pyr/__pyr__/g
  2028. !       /#[a-z]*if.*[ (]is68k/    s/is68k/__is68k__/g
  2029. !       /#[a-z]*if.*[ (]sun386/    s/sun386/__sun386__/g
  2030.         s/u_char\([     ][     ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[     ]*:[     ]*[0-9][0-9]*\)/u_int\1/
  2031.         s/u_short\([     ][     ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[     ]*:[     ]*[0-9][0-9]*\)/u_int\1/
  2032.         s/ushort\([     ][     ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[     ]*:[     ]*[0-9][0-9]*\)/u_int\1/
  2033. --- 155,171 ----
  2034.           s/#machine(\([^)]*\))/defined(__\1__)/g
  2035.           s/#system(\([^)]*\))/defined(__\1__)/g
  2036.           s/#cpu(\([^)]*\))/defined(__\1__)/g
  2037. !       /#[a-z]*if.*[     (]m68k/        s/m68k/__m68k__/g
  2038. !       /#[a-z]*if.*[     (]__i386/    s/__i386/__i386__/g
  2039. !       /#[a-z]*if.*[     (]i386/        s/i386/__i386__/g
  2040. !       /#[a-z]*if.*[     (]sparc/    s/sparc/__sparc__/g
  2041. !       /#[a-z]*if.*[     (]mc68000/    s/mc68000/__mc68000__/g
  2042. !       /#[a-z]*if.*[     (]vax/        s/vax/__vax__/g
  2043. !       /#[a-z]*if.*[     (]ns32000/    s/ns32000/__ns32000__/g
  2044. !       /#[a-z]*if.*[     (]pyr/        s/pyr/__pyr__/g
  2045. !       /#[a-z]*if.*[     (]is68k/    s/is68k/__is68k__/g
  2046. !       /#[a-z]*if.*[     (]sun/        s/sun[234]?[cx8]?[6]?/__&__/g
  2047. !       /#[a-z]*if.*[     (]sun/        s/sun[234]\{0,1\}[cx8]\{0,1\}[6]\{0,1\}/__&__/g
  2048.         s/u_char\([     ][     ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[     ]*:[     ]*[0-9][0-9]*\)/u_int\1/
  2049.         s/u_short\([     ][     ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[     ]*:[     ]*[0-9][0-9]*\)/u_int\1/
  2050.         s/ushort\([     ][     ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[     ]*:[     ]*[0-9][0-9]*\)/u_int\1/
  2051. *** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/fixincludes    Sun Feb 16 22:43:11 1992
  2052. --- fixincludes    Fri Mar  6 15:17:55 1992
  2053. ***************
  2054. *** 132,153 ****
  2055.         /#define.CTRL/        s/'\''c'\''/c/g
  2056.         /#define._CTRL/        s/'\''c'\''/c/g
  2057.         /#define.BSD43_CTRL/        s/'\''c'\''/c/g
  2058. !       /#[a-z]*if.*[ (]m68k/        s/m68k/__m68k__/g
  2059. !       /#[a-z]*if.*[ (]__i386/    s/__i386/__i386__/g
  2060. !       /#[a-z]*if.*[ (]i386/        s/i386/__i386__/g
  2061. !       /#[a-z]*if.*[ (]sparc/    s/sparc/__sparc__/g
  2062. !       /#[a-z]*if.*[ (]mc68000/    s/mc68000/__mc68000__/g
  2063. !       /#[a-z]*if.*[ (]vax/        s/vax/__vax__/g
  2064. !       /#[a-z]*if.*[ (]sun3x/    s/sun3x/__sun3x__/g
  2065. !       /#[a-z]*if.*[ (]sun3/        s/sun3/__sun3__/g
  2066. !       /#[a-z]*if.*[ (]sun2/        s/sun2/__sun2__/g
  2067. !       /#[a-z]*if.*[ (]sun4c/    s/sun4c/__sun4c__/g
  2068. !       /#[a-z]*if.*[ (]sun4/        s/sun4/__sun4__/g
  2069. !       /#[a-z]*if.*[ (]sun/        s/sun/__sun__/g
  2070. !       /#[a-z]*if.*[ (]ns32000/    s/ns32000/__ns32000__/g
  2071. !       /#[a-z]*if.*[ (]pyr/        s/pyr/__pyr__/g
  2072. !       /#[a-z]*if.*[ (]is68k/    s/is68k/__is68k__/g
  2073. !       /#[a-z]*if.*[ (]sun386/    s/sun386/__sun386__/g
  2074.         /#define.NULL[     ]/    i\
  2075.           #undef NULL
  2076.       ' $2/$file > $2/$file.sed
  2077. --- 132,148 ----
  2078.         /#define.CTRL/        s/'\''c'\''/c/g
  2079.         /#define._CTRL/        s/'\''c'\''/c/g
  2080.         /#define.BSD43_CTRL/        s/'\''c'\''/c/g
  2081. !       /#[a-z]*if.*[     (]m68k/        s/m68k/__m68k__/g
  2082. !       /#[a-z]*if.*[     (]__i386/    s/__i386/__i386__/g
  2083. !       /#[a-z]*if.*[     (]i386/        s/i386/__i386__/g
  2084. !       /#[a-z]*if.*[     (]sparc/    s/sparc/__sparc__/g
  2085. !       /#[a-z]*if.*[     (]mc68000/    s/mc68000/__mc68000__/g
  2086. !       /#[a-z]*if.*[     (]vax/        s/vax/__vax__/g
  2087. !       /#[a-z]*if.*[     (]ns32000/    s/ns32000/__ns32000__/g
  2088. !       /#[a-z]*if.*[     (]pyr/        s/pyr/__pyr__/g
  2089. !       /#[a-z]*if.*[     (]is68k/    s/is68k/__is68k__/g
  2090. !       /#[a-z]*if.*[     (]sun/        s/sun[234]\{0,1\}[cx8]\{0,1\}[6]\{0,1\}/__&__/g
  2091. !       /#[a-z]*if.*[     (]sun/        s/sun[234]?[cx8]?[6]?/__&__/g
  2092.         /#define.NULL[     ]/    i\
  2093.           #undef NULL
  2094.       ' $2/$file > $2/$file.sed
  2095.